package com.xfzcode.service;

import com.xfzcode.pojo.CommonEntity;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.rest.RestStatus;

import java.util.List;

/**
 * @Author XMLee
 * @Date 2022年08月11日 22:46
 * @Description:
 */
public interface ElasticsearchDocumentService {
    //全文检索
    SearchResponse matchQuery(CommonEntity commonEntity) throws Exception;

    //结构化搜索
    SearchResponse termQuery(CommonEntity commonEntity) throws Exception;

    //自动补全
    public List<String> cSuggest(CommonEntity commonEntity) throws Exception;

    RestStatus bulkAndDoc(CommonEntity commonEntity) throws Exception;

    //自动纠错
    String parseSuggest(CommonEntity commonEntity) throws Exception;

    //搜索推荐（当输入的关键词过多的时候系统进行推荐）
    public String tSuggest(CommonEntity commonEntity) throws Exception;
}
